FROM openjdk:8-jre

COPY miniprogram/target/*.jar /app.jar

COPY website/target/*.jar /web.jar

# 设置容器系统时区
RUN ln -snf /usr/share/zoneinfo/"Asia/Shanghai" /etc/localtime && echo "Asia/Shanghai" > /etc/timezone

RUN echo -e \
"#!/bin/sh\n"\
"nohup java -jar  /web.jar &\n"\
>> /usr/bin/start.sh

RUN chmod +x /usr/bin/start.sh
CMD nohup sh -c "start.sh && java -jar  /app.jar"
